#ifndef UTIL_PERSISTENCE_H
#define UTIL_PERSISTENCE_H

#include "tinyxml.h"
#include "../Domain/Categorias.h"
#include "IwArray.h"

#define GENTRACE(a, b, c) printf("[%s, %s] TRAZA: %s\n", a, b, c)

class CUtilPersistence
{

public:
	CUtilPersistence();
	void saveFile(const char *data, int32 dataLen, char* name);
	CIwArray<CCategorias *> LoadCategories();
	

private:
	TiXmlElement *createRegisterInfo(char* name, char* email, char* pass, char* numero, char* validate, char* reminder);
	void setNode(TiXmlNode *node, char *value);
	CCategorias *getCategoriesFromItem(TiXmlNode *item);
};

#endif